package com.sophossystems.client.asmon.hibernate;

import java.io.Serializable;

import com.sophossystems.client.asmon.dto.RoleDTO;

public class Role implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** 
	 * This attribute maps to the column idRole in the Role table.
	 */
	protected int idRole;

	/** 
	 * This attribute maps to the column Name in the Role table.
	 */
	protected String name;

	/** 
	 * This attribute maps to the column idRoleSuperior in the Role table.
	 */
	protected int idRoleSuperior;

	/** 
	 * This attribute represents whether the primitive attribute idRoleSuperior is null.
	 */
	protected boolean idRoleSuperiorNull = true;

	/**
	 * Method 'Role'
	 * 
	 */
	public Role()
	{
	}

	/**
	 * Method 'getIdRole'
	 * 
	 * @return int
	 */
	public int getIdRole()
	{
		return idRole;
	}

	/**
	 * Method 'setIdRole'
	 * 
	 * @param idRole
	 */
	public void setIdRole(int idRole)
	{
		this.idRole = idRole;
	}

	/**
	 * Method 'getName'
	 * 
	 * @return java.lang.String
	 */
	public java.lang.String getName()
	{
		return name;
	}

	/**
	 * Method 'setName'
	 * 
	 * @param name
	 */
	public void setName(java.lang.String name)
	{
		this.name = name;
	}

	/**
	 * Method 'getIdRoleSuperior'
	 * 
	 * @return int
	 */
	public int getIdRoleSuperior()
	{
		return idRoleSuperior;
	}

	/**
	 * Method 'setIdRoleSuperior'
	 * 
	 * @param idRoleSuperior
	 */
	public void setIdRoleSuperior(int idRoleSuperior)
	{
		this.idRoleSuperior = idRoleSuperior;
		this.idRoleSuperiorNull = false;
	}

	/** 
	 * Sets the value of idRoleSuperiorNull
	 */
	public void setIdRoleSuperiorNull(boolean idRoleSuperiorNull)
	{
		this.idRoleSuperiorNull = idRoleSuperiorNull;
	}

	/** 
	 * Gets the value of idRoleSuperiorNull
	 */
	public boolean isIdRoleSuperiorNull()
	{
		return idRoleSuperiorNull;
	}

	public void mapper(RoleDTO role){
		
		this.idRole = role.getIdRole();
		this.name = role.getName();
		this.idRoleSuperior = role.getIdRoleSuperior();
		
	}
}
